{% extends 'base.html' %}

{% block title %}登录{% endblock %}

{% block content %}

{% with messages = get_flashed_messages(with_categories=true) %}
    {% if messages %}
    {% for category, message in messages %}
        <div class="alert alert-{{ category }}" role="alert">{{ message }}</div>
    {% endfor %}
    {% endif %}
{% endwith %}
<div class="card">
    <div class="card-body">
        <form action="/login" method="POST">
            <div class="mb-3">
                <label for="loginname" class="form-label">用户</label>
                <input type="text" class="form-control" id="loginname" aria-describedby="emailHelp" name="login_name">
            </div>
            <div class="mb-3">
                <label for="password" class="form-label">密码</label>
                <input type="password" class="form-control" id="password" name="password">
            </div>
            <button type="submit" class="btn btn-primary">登录</button>
        </form>
    </div>
  </div>

{% endblock %}

